package com.heitian.ssm.controller;

import com.heitian.ssm.model.User;
import com.heitian.ssm.service.UserService;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.beans.factory.annotation.Autowired;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.List;

/**
 * Created by Administrator on 2017-06-09.
 */
@Path("userService")
public class UserServiceQuery extends ResourceConfig {

    @Autowired
    private UserService userService;

    @GET
    @Path("getUserList")
    @Produces(MediaType.APPLICATION_JSON)
    public List<User> getList(){
        List<User> list = userService.getAllUser();
        return list;
    }

}
